package com.leshua.channel.mpos;

import com.leshua.channel.mpos.network.server.ScanPayTcpServer;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.ImportResource;

import javax.annotation.Resource;

@SpringBootApplication
@ImportResource(locations = {
        "classpath:spring-mybatis-lepos.xml",
        "classpath:spring-mybatis-lepos_business.xml",
        "classpath:spring-mybatis-leposx.xml",
        "classpath:spring-mybatis-posp.xml",
        "classpath:spring-mybatis-mpos.xml",
        "classpath:spring-mybatis-szposp.xml"
})
@EnableDiscoveryClient
@EnableFeignClients
public class MposProvideApplication implements CommandLineRunner {

    @Resource
    private ScanPayTcpServer scanPayTcpServer;

    public static void main(String[] args) {
        // 测试
        // 测试分支
        // 再测试下啊
        SpringApplication.run(MposProvideApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
        scanPayTcpServer.run();
    }
}
